home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3s / tmpfile.z / tmpfile
Text File  |  1998-10-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTMMMMPPPPFFFFIIIILLLLEEEE((((3333SSSS))))                                                        TTTTMMMMPPPPFFFFIIIILLLLEEEE((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tmpfile - create a temporary file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.  
  14.      FFFFIIIILLLLEEEE ****ttttmmmmppppffffiiiilllleeee ((((vvvvooooiiiidddd))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _t_m_p_f_i_l_e creates a temporary file, and returns a corresponding FILE
  18.      pointer.  The file is created on the temporary directory indicated by the
  19.      string PPPP____ttttmmmmppppddddiiiirrrr in <_s_t_d_i_o._h>.  If the file cannot be opened, a NULL
  20.      pointer is returned.  Upon return from _t_m_p_f_i_l_e, you may print an error
  21.      message using _p_e_r_r_o_r(3C), to determine the reason for the failure.  A
  22.      success call to _t_m_p_f_i_l_e will create a temporary file just long enough to
  23.      obtain the FILE pointer, then delete the file with _u_n_l_i_n_k(_2), and finally
  24.      return the FILE pointer to the calling process.  Thus, the only means of
  25.      accessing the temporary file is though the FILE pointer.  The file is
  26.      opened for update ("w+").
  27.  
  28.      Although the name of the temporary file is generated similarly to those
  29.      produced by _t_m_p_n_a_m(3S), _t_m_p_f_i_l_e uses its own algorithm to generate
  30.      filenames similar to, but unique from, those generated by _t_m_p_n_a_m.  This
  31.      allocates the entire space of _t_m_p_n_a_m-generated names to applications
  32.      code. (See _t_m_p_n_a_m(3S) for more information.)
  33.  
  34. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  35.      creat(2), unlink(2), fopen(3S), mktemp(3C), perror(3C), stdio(3S),
  36.      tmpnam(3S).
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.